import { defineConfig } from 'vitepress'
import zh from './locales/zh'

// https://vitepress.dev/reference/site-config
export default defineConfig({
  title: '月末的前端小栈',
  description: '个人博客站点',
  lang: 'zh',
  head: [
    ['link', { rel: 'icon', href: '/favicon.ico' }],
    [
      'script',
      { id: 'baidutongji' },
      `var _hmt = _hmt || [];
      (function() {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?f2eddc86865d00df782ab7329e6c803c";
        var s = document.getElementsByTagName("script")[0]; 
        s.parentNode.insertBefore(hm, s);
      })();`,
    ],
  ],
  sitemap: {
    hostname: 'https://aring.cc',
  },
  themeConfig: {
    // https://vitepress.dev/reference/default-theme-config
    logo: '/logo.png',
    nav: [
      { text: '主页', link: '/' },
      { text: '个人介绍', link: '/intro/' },
      { text: '开源项目', link: '/open-source/draw-together' },
      { text: '私人项目', link: '/personal-project/awakening-of-war-soul-ol' },
    ],
    ...zh,

    sidebar: {
      '/open-source/': [
        {
          text: '开源项目',
          items: [
            { text: 'DrawTogether(一起来画画)', link: '/open-source/draw-together' },
            { text: 'OnlineBookstore(网上书店)', link: '/open-source/online-bookstore' },
            { text: 'VueMarquee(Vue跑马灯)', link: '/open-source/vue-marquee' },
            { text: 'TicTacToe(井字棋)', link: '/open-source/tic-tac-toe' },
            { text: 'HumanBenchmark(人类基准测试)', link: '/open-source/human-benchmark' },
            { text: 'Sokoban(魔改推箱子)', link: '/open-source/sokoban' },
          ],
        },
      ],
      '/personal-project/': [
        {
          text: '私人项目',
          items: [{ text: '战魂觉醒OL', link: '/personal-project/awakening-of-war-soul-ol' }],
        },
      ],
    },

    socialLinks: [{ icon: 'github', link: 'https://github.com/aring1998' }],

    footer: {
      copyright: '<a href="https://beian.miit.gov.cn/">闽ICP备2022004075号</a>',
    },
  },
})
